package com.cdqidi.core.weixinmanager.model;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 订阅结果
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_wx_subscribe")
public class Subscribe extends Model<Subscribe> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "sid", type = IdType.ASSIGN_ID)
    private String sid;
    /**
     * 用户标识
     */
    @TableField("openid")
    private String openid;
    /**
     * 模板id
     */
    @TableField("template_id")
    private String templateId;
    /**
     * 订阅结果:1接收2拒收
     */
    @TableField("subscribe_status")
    private Integer subscribeStatus;
    /**
     * 操作时间
     */
    @TableField("operator_time")
    private LocalDateTime operatorTime;

    public void freeData() {
        this.sid = null;
        this.openid = null;
        this.templateId = null;
        this.subscribeStatus = null;
        this.operatorTime = null;
    }

}
